// 审核状态
export const STATA_OPTIONS = [
  { label: '待审批', value: '1' },
  { label: '审批驳回', value: '2' },
  { label: '撤回', value: '3' },
  { label: '审批通过', value: '4' },
]
export const FORM_ITEMS = [
  {
    prop: 'status',
    label: '审核状态',
    type: 'select',
    options: STATA_OPTIONS
  },
  {
    prop: 'submitName',
    label: '提交人',
    type: 'input'
  },
  {
    prop: 'submitDeptName',
    label: '提交部门',
    type: 'input'
  },
  {
    prop: 'recordNo',
    label: '单据号',
    type: 'input'
  },
]
export const TABLE_COLUMNS = [
  {
    title: '单据号',
    key: 'recordNo',
  },
  {
    title: '单据状态',
    key: 'statusStr',
  },
  {
    title: '单据类型',
    key: 'recordTypeStr',
  },
  {
    title: '提交人',
    key: 'submitName',
  },
  {
    title: '提交人部门',
    key: 'submitDeptName',
  },
  {
    title: '提交时间',
    key: 'submitTime',
  },
]

// 查看钢材类
export const STEEL_VIEW_TABLE_CLOUMNS = [
  {
    title: '四级类名称',
    key: 'categoryName',
    width: 80
  },
  {
    title: '四级类代码',
    key: 'categoryCode',
  },
  {
    title: '可直送金额（万元）',
    key: 'directDeliveryAmount',
  },
  {
    title: '可直送范围',
    key: 'directDeliveryRangeStr',
  },
  {
    title: '费用比例（%）',
    key: 'expenseRatio',
  },
  {
    title: '备注',
    key: 'remark',
  },
]

// 查看供应商
export const SUPPLIER_VIEW_TABLE_CLOUMNS = [
  {
    title: '归属中心',
    key: 'belongDepartmentName',
    width: 100
  },
  {
    title: '供应商代码',
    key: 'supplierCode',
    width: 120
  },
  {
    title: '供应商名称',
    key: 'supplierName',
    width: 80
  },
  {
    title: '供应商管理区域',
    key: 'supplierManagerAreaName',
  },
  {
    title: '供应商类型',
    key: 'supplierStatusStr',
  },
  {
    title: '供应商性质',
    key: 'supplierNatureStr',
  },
  {
    title: '可直送金额（万元）',
    key: 'directDeliveryAmount',
  },
  {
    title: '可直送范围',
    key: 'directDeliveryRangeStr',
    render: (h, { row }) => {
      // 全国 1 具体省市
      if (row.directDeliveryRange == 1) {
        return <span>{row.directDeliveryRangeStr}</span>
      }
      return <span>{row.cityNameList}</span>
    }
  },
  {
    title: '供应商到货周期',
    key: 'supplyCycle',
  },
  {
    title: '运费承担方',
    key: 'freightPayerStr',
  },
  {
    title: '费用比例（%）',
    key: 'expenseRatio',
  },
  {
    title: '备注',
    key: 'remark',
  },
]
